package com.example.springboot_admin.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.springboot_admin.pojo.Spus;
import com.example.springboot_admin.pojo.Tags;
import com.example.springboot_admin.service.ITagsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author svblack
 * @since 2024-09-14
 */
@RestController
@RequestMapping("/tags")
public class TagsController {
    @Autowired
    ITagsService tagsService;
    @RequestMapping("list")
    IPage<Tags> list(@RequestParam(defaultValue = "1") int page,
                     @RequestParam(defaultValue = "5")int limit){
        return tagsService.page(new Page<>(page,limit));
    }
}

